package com.woniuxy.opencv.service.impl;


import com.woniuxy.opencv.client.faceLoginFeign;
import com.woniuxy.opencv.service.FaceRecognitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FaceRecognitionServiceImpl implements FaceRecognitionService {
    @Autowired
    private faceLoginFeign faceLoginFeign;

    @Override
    public boolean verifyFace(String faceImage) {
        try {
            // 调用人脸识别微服务验证人脸
            Object response = faceLoginFeign.faceLogin(faceImage);
            // 简单判断，实际应根据返回结果解析
            return response != null;
        } catch (Exception e) {
            return false;
        }
    }
}
